package com.tarim.streetdance.mapper;

import com.tarim.streetdance.model.VideoCollect;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component("VideoCollectMapper")
public interface VideoCollectMapper {
    int deleteByPrimaryKey(Long id);

    int insert(VideoCollect record);

    //新增点赞记录
    int insertSelective(VideoCollect record);

    VideoCollect selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(VideoCollect record);

    int updateByPrimaryKey(VideoCollect record);

    //删除点赞记录
    int updateForDelete(VideoCollect record);

    //查询用户点赞记录
    List<VideoCollect> selectByUserId(VideoCollect record);
    Long selectByUserIdCount(VideoCollect record);

    //查询视频点赞数量
    Long selectCountByVideoId(VideoCollect record);

    //查询用户是否收藏对应视频
    Long selectCountForIsCollect(VideoCollect record);
}